package a.f.h.f;

import a.a.hb;
import a.c.*;
import a.c.d;
import a.d.s;
import a.d.t;
import a.f.j.db;
import a.f.o;
import a.f.oc;
import a.f.wc;
import a.f.zb;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;

public class c
{
  public static final Object a = "y.layout.orthogonal.mixed.GroupingManager: Dummy Node Group";
  protected static final int b = 2;
  protected static final s c = new s(2.0D, 2.0D);
  private boolean d = false;
  private n e = null;
  private n f = null;
  private ab g = null;
  private ab h = null;
  private n i = null;
  private n j = null;
  private x k = null;
  private ArrayList l = new ArrayList();
  public static int m;
  public static int n;
  
  public n a()
  {
    return this.j;
  }
  
  public boolean c()
  {
    return this.d;
  }
  
  public void a(boolean paramBoolean)
  {
    this.d = paramBoolean;
  }
  
  public void a(db paramdb)
  {
    this.l.add(paramdb);
  }
  
  public void b(db paramdb)
  {
    int i1 = this.l.indexOf(paramdb);
    if (i1 >= 0) {
      this.l.remove(i1);
    }
  }
  
  protected void a(d paramd, d[] paramArrayOfd)
  {
    int i2 = m;
    int i1 = 0;
    do
    {
      if (i1 >= this.l.size()) {
        break;
      }
      db localdb = (db)this.l.get(i1);
      localdb.a(paramd, paramArrayOfd);
      i1++;
    } while (i2 == 0);
  }
  
  protected void a(d[] paramArrayOfd, d paramd)
  {
    int i2 = m;
    int i1 = 0;
    do
    {
      if (i1 >= this.l.size()) {
        break;
      }
      db localdb = (db)this.l.get(i1);
      localdb.a(paramArrayOfd, paramd);
      i1++;
    } while (i2 == 0);
  }
  
  public void a(o paramo, x paramx1, k paramk1, k paramk2, x paramx2)
  {
    int i6 = n;
    int i5 = m;
    this.k = paramo.B();
    paramo.a(a, this.k);
    if (i6 == 0)
    {
      this.e = paramo.C();
      if (paramk1 != null)
      {
        localObject1 = paramo.w();
        do
        {
          if (!((m)localObject1).e()) {
            break;
          }
          localObject2 = ((m)localObject1).a();
          if (i6 != 0) {
            break label127;
          }
          this.e.a(localObject2, paramk1.get(localObject2));
          ((m)localObject1).f();
          if (i5 != 0) {
            break label125;
          }
        } while (i5 == 0);
      }
      if (i6 != 0) {}
    }
    else
    {
      this.f = paramo.C();
    }
    label125:
    if (paramk2 != null)
    {
      label127:
      localObject1 = paramo.w();
      do
      {
        if (!((m)localObject1).e()) {
          break;
        }
        localObject2 = ((m)localObject1).a();
        this.f.a(localObject2, paramk2.get(localObject2));
        ((m)localObject1).f();
      } while (i5 == 0);
    }
    Object localObject1 = paramo.t();
    Object localObject2 = paramo.u();
    this.h = new ab();
    HashMap localHashMap = new HashMap();
    n localn1 = paramo.C();
    n localn2 = paramo.C();
    this.j = paramo.C();
    this.i = paramo.C();
    m localm = paramo.w();
    do
    {
      do
      {
        if (!localm.e()) {
          break;
        }
        this.i.a(localm.a(), new d_());
        localm.f();
      } while (i5 == 0);
    } while (i6 != 0);
    int i1 = 0;
    z localz;
    label345:
    Object localObject3;
    Object localObject4;
    Object localObject5;
    label440:
    Object localObject6;
    label497:
    Object localObject7;
    label543:
    label706:
    label711:
    Object localObject8;
    Object localObject9;
    Object localObject10;
    label913:
    label973:
    label978:
    do
    {
      if (i1 >= localObject1.length) {
        break;
      }
      a.c.e locale = localObject1[i1];
      localHashMap.clear();
      localz = new z();
      if (i5 != 0) {
        break label1464;
      }
      localObject3 = locale.l();
      do
      {
        if (!((m)localObject3).e()) {
          break label543;
        }
        if (i6 != 0) {
          break label345;
        }
        localObject4 = ((m)localObject3).a();
        if (i5 != 0) {
          break;
        }
        if (((d)localObject4).e() == locale)
        {
          localObject5 = (e)this.e.get(localObject4);
          if (i6 != 0) {
            break label440;
          }
          if (i5 == 0) {}
        }
        else
        {
          localObject5 = (e)this.f.get(localObject4);
        }
        if ((i6 != 0) || (localHashMap.containsKey(localObject5)))
        {
          localObject6 = (c_)localHashMap.get(localObject5);
          if (i6 == 0) {
            if (i5 == 0) {
              break label497;
            }
          }
        }
        else
        {
          localObject6 = new c_(locale, (e)localObject5);
          localHashMap.put(localObject5, localObject6);
        }
        localz.add(localObject5);
        if (((d)localObject4).f() == locale)
        {
          ((c_)localObject6).a((d)localObject4);
          if (i6 != 0) {
            continue;
          }
          if (i5 == 0) {}
        }
        else
        {
          ((c_)localObject6).c((d)localObject4);
        }
        ((m)localObject3).f();
      } while (i5 == 0);
      localObject3 = localz.h();
      do
      {
        do
        {
          if (!((a.c.y)localObject3).e()) {
            break label1435;
          }
          localObject4 = (c_)localHashMap.get(((a.c.y)localObject3).j());
          localObject5 = ((c_)localObject4).a();
          localObject6 = a.d.w.c;
          if (i6 != 0) {
            break label1445;
          }
          if (i5 != 0) {
            break label1443;
          }
          if (((i6 != 0) || (localObject5 != null)) && ((i6 != 0) || (((e)localObject5).f())))
          {
            d locald;
            d_ locald_;
            if (i6 == 0) {
              if (((e)localObject5).h())
              {
                if (i6 == 0)
                {
                  if (((c_)localObject4).h() > 1)
                  {
                    localObject7 = new ab();
                    if (i6 == 0)
                    {
                      if (this.d)
                      {
                        localObject6 = a(paramo, (c_)localObject4, (ab)localObject7, false);
                        a(paramo, (c_)localObject4);
                      }
                    }
                    else
                    {
                      if (i6 != 0) {
                        break label711;
                      }
                      if (i5 == 0) {
                        break label706;
                      }
                    }
                    localObject7 = ((c_)localObject4).a;
                    if (i6 != 0) {
                      break label913;
                    }
                    if (((ab)localObject7).size() > 1)
                    {
                      localObject8 = paramo.i();
                      paramo.a((a.c.e)localObject8, c);
                      paramx2.a(localObject8, 1);
                      paramo.a((a.c.e)localObject8, (a.d.w)localObject6);
                      paramx1.a(localObject8, true);
                      this.k.a(localObject8, localObject4);
                      localObject9 = paramo.a((a.c.e)localObject8, locale);
                      this.h.add(localObject9);
                      this.j.a(localObject9, true);
                      this.f.a(localObject9, localObject5);
                      localObject10 = ((ab)localObject7).l();
                      do
                      {
                        if (!((m)localObject10).e()) {
                          break;
                        }
                        locald = ((m)localObject10).a();
                        locald_ = (d_)this.i.get(locald);
                        localn2.a(locald, localObject8);
                        locald_.b((d)localObject9);
                        ((m)localObject10).f();
                        if (i6 != 0) {
                          break label1432;
                        }
                        if (i5 != 0) {
                          break label1430;
                        }
                      } while (i5 == 0);
                    }
                  }
                  if (i6 != 0) {
                    break;
                  }
                }
                if (((c_)localObject4).i() <= 1) {
                  continue;
                }
                localObject7 = new ab();
                if (i6 == 0)
                {
                  if (this.d)
                  {
                    localObject6 = a(paramo, (c_)localObject4, (ab)localObject7, true);
                    a(paramo, (c_)localObject4);
                  }
                }
                else
                {
                  if (i6 != 0) {
                    break label978;
                  }
                  if (i5 == 0) {
                    break label973;
                  }
                }
                localObject7 = ((c_)localObject4).b;
                if (((ab)localObject7).size() <= 1) {
                  continue;
                }
                localObject8 = paramo.i();
                paramx1.a(localObject8, true);
                this.k.a(localObject8, localObject4);
                paramo.a((a.c.e)localObject8, c);
                paramx2.a(localObject8, 1);
                paramo.a((a.c.e)localObject8, (a.d.w)localObject6);
                localObject9 = paramo.a(locale, (a.c.e)localObject8);
                this.h.add(localObject9);
                this.j.a(localObject9, true);
                this.e.a(localObject9, localObject5);
                localObject10 = ((c_)localObject4).f();
                do
                {
                  if (!((m)localObject10).e()) {
                    break;
                  }
                  locald = ((m)localObject10).a();
                  locald_ = (d_)this.i.get(locald);
                  localn1.a(locald, localObject8);
                  locald_.a((d)localObject9);
                  ((m)localObject10).f();
                  if (i6 != 0) {
                    break label1432;
                  }
                  if (i5 != 0) {
                    break label1430;
                  }
                } while (i5 == 0);
              }
            }
            if (i6 != 0) {
              break;
            }
            if (((c_)localObject4).g() > 1)
            {
              localObject7 = new ab();
              localObject7 = ((c_)localObject4).b();
              if (((ab)localObject7).size() > 1)
              {
                localObject8 = paramo.i();
                paramo.a((a.c.e)localObject8, c);
                paramx2.a(localObject8, 1);
                paramo.a((a.c.e)localObject8, (a.d.w)localObject6);
                paramx1.a(localObject8, true);
                this.k.a(localObject8, localObject4);
                localObject9 = paramo.a((a.c.e)localObject8, locale);
                this.h.add(localObject9);
                this.j.a(localObject9, true);
                this.f.a(localObject9, localObject5);
                localObject10 = ((ab)localObject7).l();
                do
                {
                  if (!((m)localObject10).e()) {
                    break label1418;
                  }
                  locald = ((m)localObject10).a();
                  locald_ = (d_)this.i.get(locald);
                  if (i5 != 0) {
                    break;
                  }
                  if (locald.f() == locale)
                  {
                    localn2.a(locald, localObject8);
                    locald_.b((d)localObject9);
                    if (i6 != 0) {
                      continue;
                    }
                    if (i5 == 0) {}
                  }
                  else
                  {
                    localn1.a(locald, localObject8);
                    locald_.a((d)localObject9);
                  }
                  ((m)localObject10).f();
                } while (i5 == 0);
              }
            }
          }
        } while (i6 != 0);
        ((a.c.y)localObject3).f();
      } while (i5 == 0);
      if (i6 == 0) {
        i1++;
      }
    } while (i5 == 0);
    label1418:
    label1430:
    label1432:
    label1435:
    label1443:
    label1445:
    if (i6 == 0) {
      this.g = new ab();
    }
    label1464:
    n localn3 = (n)paramo.c(oc.a);
    int i2 = 0;
    label1484:
    label1638:
    label1782:
    do
    {
      if (i2 >= localObject2.length) {
        break;
      }
      localz = localObject2[i2];
      localObject3 = (e)this.e.get(localz);
      localObject4 = (e)this.f.get(localz);
      localObject5 = (a.c.e)localn1.get(localz);
      localObject6 = (a.c.e)localn2.get(localz);
      if (i5 != 0) {
        return;
      }
      if ((i6 != 0) || ((localObject5 != null) || (localObject6 != null)))
      {
        localObject7 = null;
        if (i6 == 0) {
          if (localObject5 != null)
          {
            if (i6 != 0) {
              break label1638;
            }
            if (localObject6 != null)
            {
              localObject7 = paramo.a((a.c.e)localObject5, (a.c.e)localObject6);
              this.e.a(localObject7, localObject3);
              this.f.a(localObject7, localObject4);
              break label2017;
            }
          }
        }
        int i3;
        Object localObject11;
        if (i6 == 0) {
          if (localObject5 != null)
          {
            localObject7 = paramo.a((a.c.e)localObject5, localz.f());
            this.e.a(localObject7, localObject3);
            if (i6 != 0) {
              break label2028;
            }
            if (!this.d) {
              break label2017;
            }
            localObject8 = paramo.e(localz);
            localObject9 = new ArrayList();
            localObject10 = paramo.s(localz);
            i3 = ((zb)localObject8).a();
            int i4 = 1;
            do
            {
              if (i4 >= i3) {
                break label1782;
              }
              a.d.w localw = ((zb)localObject8).a(i3 - i4);
              if (i6 != 0) {
                break label1484;
              }
              if (i5 != 0) {
                break;
              }
              if (!localw.equals(localObject10))
              {
                ((ArrayList)localObject9).add(localw);
                localObject10 = localw;
              }
              i4++;
            } while (i5 == 0);
            paramo.d((d)localObject7, paramo.s(localz));
            paramo.a((d)localObject7, a.d.w.c);
            localObject11 = new a.d.y((List)localObject9);
            paramo.b((d)localObject7, ((a.d.y)localObject11).i());
            wc.g(paramo, (d)localObject7);
            if (i6 != 0) {
              break label2121;
            }
          }
        }
        if ((goto 2017) && (localObject6 != null))
        {
          localObject7 = paramo.a(localz.e(), (a.c.e)localObject6);
          this.f.a(localObject7, localObject4);
          if (i6 != 0) {
            break label2028;
          }
          if (this.d)
          {
            localObject8 = paramo.e(localz);
            localObject9 = new ArrayList();
            do
            {
              localObject10 = paramo.r(localz);
              i3 = 0;
              do
              {
                if (i3 >= ((zb)localObject8).a() - 1) {
                  break label1970;
                }
                localObject11 = ((zb)localObject8).a(i3);
                if (i5 != 0) {
                  break;
                }
                if (!((a.d.w)localObject11).equals(localObject10))
                {
                  ((ArrayList)localObject9).add(localObject11);
                  localObject10 = localObject11;
                }
                i3++;
              } while (i5 == 0);
              paramo.c((d)localObject7, paramo.r(localz));
              paramo.b((d)localObject7, a.d.w.c);
              paramo.b((d)localObject7, new a.d.y((List)localObject9));
            } while (i6 != 0);
            wc.g(paramo, (d)localObject7);
          }
        }
        localObject8 = (d_)this.i.get(localz);
        ((d_)localObject8).c((d)localObject7);
        if (i6 == 0) {
          if (localn3 != null) {
            localn3.a(localObject7, localn3.get(localz));
          }
        }
        this.j.a(localObject7, true);
        a(localz, ((d_)localObject8).a());
        paramo.f(localz);
        this.g.add(localz);
      }
      i2++;
    } while (i5 == 0);
    label1970:
    label2017:
    label2028:
    paramo.a(localn1);
    label2121:
    if (i6 == 0) {
      paramo.a(localn2);
    }
  }
  
  void a(o paramo, c_ paramc_)
  {
    int i2 = n;
    int i1 = m;
    label398:
    if (((i2 != 0) || (paramc_.a().d())) && (paramc_.h() > 1))
    {
      ab localab = new ab(paramc_.e());
      localab.a(new Comparator()
      {
        private final o val$graph;
        
        public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
        {
          a.c.e locale1 = ((d)paramAnonymousObject1).e();
          a.c.e locale2 = ((d)paramAnonymousObject2).e();
          return l.a(this.val$graph.m(locale1), this.val$graph.m(locale2));
        }
      });
      m localm = localab.l();
      Object localObject1 = localm.a();
      Object localObject2 = paramo.v(((d)localObject1).e());
      localm.f();
      d locald1;
      t localt;
      d locald2;
      label210:
      do
      {
        do
        {
          if (!localm.e()) {
            break;
          }
          locald1 = localm.a();
          localt = paramo.v(locald1.e());
          if (i1 != 0) {
            break label286;
          }
          if (((t)localObject2).e < localt.e + localt.b)
          {
            if (i2 != 0) {
              continue;
            }
            if (localt.e < ((t)localObject2).e + ((t)localObject2).b)
            {
              if (i2 != 0) {
                break label210;
              }
              if (((d)localObject1).e().c(locald1.e()) == null) {
                locald2 = paramo.a(((d)localObject1).e(), locald1.e());
              }
            }
          }
          localObject1 = locald1;
          localObject2 = localt;
          localm.f();
        } while (i1 == 0);
        localab.a(new Comparator()
        {
          private final o val$graph;
          
          public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
          {
            a.c.e locale1 = ((d)paramAnonymousObject1).e();
            a.c.e locale2 = ((d)paramAnonymousObject2).e();
            return l.a(this.val$graph.n(locale1), this.val$graph.n(locale2));
          }
        });
        localm = localab.l();
        localObject1 = localm.a();
        localObject2 = paramo.v(((d)localObject1).e());
      } while (i2 != 0);
      localm.f();
      label286:
      do
      {
        if (!localm.e()) {
          break;
        }
        locald1 = localm.a();
        localt = paramo.v(locald1.e());
        if (i2 == 0)
        {
          if (((t)localObject2).d < localt.d + localt.a)
          {
            if (i2 != 0) {
              continue;
            }
            if (localt.d < ((t)localObject2).d + ((t)localObject2).a)
            {
              if (i2 != 0) {
                break label398;
              }
              if (((d)localObject1).e().c(locald1.e()) == null) {
                locald2 = paramo.a(((d)localObject1).e(), locald1.e());
              }
            }
          }
          localObject1 = locald1;
          localObject2 = localt;
          localm.f();
        }
      } while (i1 == 0);
    }
  }
  
  a.d.w a(o paramo, c_ paramc_, ab paramab, boolean paramBoolean)
  {
    int i4 = n;
    int i3 = m;
    Object localObject1 = a.d.w.c;
    z localz = new z();
    HashMap localHashMap = new HashMap();
    m localm = paramBoolean ? paramc_.f() : paramc_.e();
    a.d.w localw;
    ArrayList localArrayList1;
    label202:
    do
    {
      if (!localm.e()) {
        break;
      }
      d locald = localm.a();
      localObject2 = paramo.e(locald);
      if (i3 != 0) {
        break label215;
      }
      if (((zb)localObject2).a() > 0)
      {
        localw = paramBoolean ? ((zb)localObject2).a(0) : ((zb)localObject2).a(((zb)localObject2).a() - 1);
        localArrayList1 = (ArrayList)localHashMap.get(localw);
        if (i4 == 0) {
          if (localArrayList1 == null)
          {
            ArrayList localArrayList2 = new ArrayList();
            localArrayList2.add(locald);
            localHashMap.put(localw, localArrayList2);
            localz.add(localw);
            if (i4 != 0) {
              continue;
            }
            if (i3 == 0) {
              break label202;
            }
          }
        }
        localArrayList1.add(locald);
      }
      localm.f();
    } while (i3 == 0);
    label215:
    int i1 = 0;
    Object localObject2 = localz.h();
    do
    {
      if (!((a.c.y)localObject2).e()) {
        break;
      }
      if (i3 != 0) {
        break label311;
      }
      localw = (a.d.w)((a.c.y)localObject2).j();
      localArrayList1 = (ArrayList)localHashMap.get(localw);
      int i2 = localArrayList1.size();
      if (i4 == 0)
      {
        if (i2 > i1)
        {
          localObject1 = localw;
          i1 = i2;
          paramab.addAll(localArrayList1);
        }
        ((a.c.y)localObject2).f();
      }
    } while (i3 == 0);
    label311:
    return localObject1;
  }
  
  public void a(q paramq)
  {
    paramq.a(this.i);
    paramq.a(this.j);
    paramq.a(this.e);
    paramq.a(this.f);
  }
  
  public void a(o paramo, x paramx)
  {
    int i2 = n;
    int i1 = m;
    if (i2 == 0) {
      if (this.g == null) {
        return;
      }
    }
    Object localObject1 = this.g.l();
    Object localObject2;
    do
    {
      if (!((m)localObject1).e()) {
        break;
      }
      localObject2 = ((m)localObject1).a();
      if (i2 != 0) {
        break label113;
      }
      paramo.g((d)localObject2);
      d_ locald_ = (d_)this.i.get(localObject2);
      a(locald_.a(), (d)localObject2);
      ((m)localObject1).f();
      if (i1 != 0) {
        break label112;
      }
    } while (i1 == 0);
    if (i2 == 0) {
      a(paramo);
    }
    label112:
    label113:
    localObject1 = paramo.v();
    do
    {
      if (!((a.c.w)localObject1).e()) {
        break;
      }
      localObject2 = ((a.c.w)localObject1).d();
      if ((i2 == 0) && (i1 != 0)) {
        return;
      }
      if (i2 == 0)
      {
        if (paramx.getBool(localObject2)) {
          paramo.a((a.c.e)localObject2);
        }
        ((a.c.w)localObject1).f();
      }
    } while (i1 == 0);
    paramo.j(a);
    if (i2 == 0) {
      paramo.a(this.k);
    }
  }
  
  private void a(o paramo, d paramd1, d paramd2)
  {
    int i5 = n;
    int i4 = m;
    if (paramd2 != null)
    {
      a.d.y localy = paramo.l(paramd2);
      zb localzb = paramo.e(paramd1);
      a.d.w[] arrayOfw;
      if (i5 == 0) {
        if (paramd2.e() == paramd1.e())
        {
          arrayOfw = localy.h();
          localzb.a(paramo.e(paramd2).c());
          int i1 = 0;
          if (i1 < arrayOfw.length) {}
          while (i5 != 0)
          {
            localzb.a(arrayOfw[i1].a(), arrayOfw[i1].b());
            i1++;
            if (i5 != 0) {
              break label150;
            }
            if (i4 != 0) {
              break label148;
            }
            if (i4 == 0) {
              break;
            }
          }
          localzb.a(paramo.m(paramd2.f()), paramo.n(paramd2.f()));
          label148:
          if (i4 == 0) {
            label150:
            return;
          }
        }
      }
      a.d.w localw;
      int i3;
      if (i5 == 0) {
        if (paramd2.f() == paramd1.f())
        {
          arrayOfw = localy.h();
          localw = localzb.a(localzb.a() - 1);
          if (i5 == 0) {
            if (!localw.equals(paramo.o(paramd2.e()))) {
              localzb.a(paramo.m(paramd2.e()), paramo.n(paramd2.e()));
            }
          }
          i3 = 0;
          if (i3 < arrayOfw.length) {}
          while (i5 != 0)
          {
            localzb.a(arrayOfw[i3].a(), arrayOfw[i3].b());
            i3++;
            if (i5 != 0) {
              break label314;
            }
            if (i4 != 0) {
              break label312;
            }
            if (i4 == 0) {
              break;
            }
          }
          localzb.b(paramo.e(paramd2).d());
          label312:
          if (i4 == 0) {
            label314:
            return;
          }
        }
      }
      if (i5 == 0) {
        if (paramd2.e() == paramd1.f())
        {
          arrayOfw = localy.i().h();
          localw = localzb.a(0);
          if (i5 == 0) {
            if (!localw.equals(paramo.o(paramd2.f()))) {
              localzb.a(paramo.m(paramd2.f()), paramo.n(paramd2.f()));
            }
          }
          i3 = 0;
          if (i3 < arrayOfw.length) {}
          while (i5 != 0)
          {
            localzb.a(arrayOfw[i3].a(), arrayOfw[i3].b());
            i3++;
            if (i5 != 0) {
              break label473;
            }
            if (i4 != 0) {
              break label471;
            }
            if (i4 == 0) {
              break;
            }
          }
          localzb.b(paramo.e(paramd2).c());
          label471:
          if (i4 == 0) {
            label473:
            return;
          }
        }
      }
      if (paramd2.f() == paramd1.e())
      {
        arrayOfw = localy.i().h();
        localzb.a(paramo.e(paramd2).d());
        i2 = 0;
        if (i2 < arrayOfw.length) {}
        while (i5 != 0)
        {
          localzb.a(arrayOfw[i2].a(), arrayOfw[i2].b());
          i2++;
          if (i5 != 0) {
            break label596;
          }
          if (i4 != 0) {
            break label594;
          }
          if (i4 == 0) {
            break;
          }
        }
        localzb.a(paramo.m(paramd2.e()), paramo.n(paramd2.e()));
        label594:
        label596:
        if (i5 == 0) {
          if (i4 == 0) {
            return;
          }
        }
      }
      else
      {
        localzb.a(paramo.m(paramd2.e()), paramo.n(paramd2.e()));
        arrayOfw = localy.h();
      }
      int i2 = 0;
      if (i2 < arrayOfw.length) {}
      while (i5 != 0)
      {
        localzb.a(arrayOfw[i2].a(), arrayOfw[i2].b());
        i2++;
        if ((i5 == 0) && (i4 != 0)) {
          return;
        }
        if (i4 == 0) {
          break;
        }
      }
      localzb.a(paramo.m(paramd2.f()), paramo.n(paramd2.f()));
    }
  }
  
  private void a(o paramo)
  {
    int i1 = m;
    m localm = this.g.l();
    do
    {
      if (!localm.e()) {
        break;
      }
      d locald = localm.a();
      zb localzb = paramo.e(locald);
      localzb.b();
      d_ locald_ = (d_)this.i.get(locald);
      a(paramo, locald, locald_.b());
      a(paramo, locald, locald_.d());
      a(paramo, locald, locald_.c());
      localm.f();
    } while (i1 == 0);
  }
  
  public void a(o paramo, a.f.h.f.a.e parame, n paramn1, x paramx, n paramn2)
  {
    int i4 = n;
    int i3 = m;
    n localn = paramo.C();
    Object localObject1 = paramo.w();
    label174:
    label178:
    label232:
    do
    {
      if (!((m)localObject1).e()) {
        break;
      }
      localObject2 = ((m)localObject1).a();
      localn.a(localObject2, 5.0D);
      localObject3 = (e)this.e.get(localObject2);
      localObject4 = (e)this.f.get(localObject2);
      int i1 = (i4 != 0) || (localObject3 != null) ? ((e)localObject3).i() : 0;
      int i2 = (i4 != 0) || (localObject4 != null) ? ((e)localObject4).i() : 0;
      if (i4 == 0) {
        if (i1 == 0)
        {
          if (i4 == 0) {
            if (i2 == 0) {
              break label174;
            }
          }
        }
        else
        {
          if (i4 != 0) {
            break label178;
          }
          parame.a((d)localObject2, 1);
          localn.a(localObject2, 0.0D);
        }
      }
      if (i3 != 0) {
        parame.a((d)localObject2, 0);
      }
      if ((i4 != 0) || (localObject4 != null)) {
        if (i4 == 0)
        {
          if (((e)localObject4).d()) {
            paramn1.a(localObject2, true);
          }
        }
        else
        {
          if (i4 != 0) {
            continue;
          }
          if (i3 == 0) {
            break label232;
          }
        }
      }
      paramn1.a(localObject2, false);
      ((m)localObject1).f();
    } while (i3 == 0);
    localObject1 = hb.a(paramo, localn);
    paramo.a(localn);
    Object localObject2 = new boolean[paramo.m()];
    Object localObject3 = ((ab)localObject1).l();
    do
    {
      do
      {
        if (!((m)localObject3).e()) {
          break;
        }
        if ((i4 == 0) && (i3 != 0)) {
          break label330;
        }
        localObject2[localObject3.a().d()] = 1;
        ((m)localObject3).f();
      } while (i3 == 0);
    } while (i4 != 0);
    label330:
    localObject3 = new boolean[paramo.m()];
    Object localObject5;
    if ((i4 != 0) || (((ab)localObject1).size() > 0))
    {
      localObject4 = ((ab)localObject1).l();
      do
      {
        do
        {
          if (!((m)localObject4).e()) {
            break;
          }
          localObject5 = ((m)localObject4).a();
          if (i3 != 0) {
            break label447;
          }
          if (localObject3[localObject5.d()] == 0)
          {
            if (i4 != 0) {
              continue;
            }
            if (parame.a((d)localObject5) != 0) {
              a(((d)localObject5).e(), (boolean[])localObject2, (boolean[])localObject3, parame);
            }
          }
          ((m)localObject4).f();
        } while (i3 == 0);
      } while (i4 != 0);
      localObject4 = ((ab)localObject1).l();
      label447:
      do
      {
        if (!((m)localObject4).e()) {
          break;
        }
        localObject5 = ((m)localObject4).a();
        if (i4 == 0)
        {
          if (localObject3[localObject5.d()] != 0)
          {
            if (i4 != 0) {
              continue;
            }
            if (localObject2[localObject5.d()] != 0)
            {
              if (i4 != 0) {
                continue;
              }
              if (parame.a((d)localObject5) == 0) {
                parame.a((d)localObject5, 1);
              }
            }
          }
          ((m)localObject4).f();
        }
      } while (i3 == 0);
    }
    Object localObject4 = paramo.v();
    label676:
    do
    {
      do
      {
        if (!((a.c.w)localObject4).e()) {
          return;
        }
        localObject5 = ((a.c.w)localObject4).d();
        if (i4 != 0) {
          break;
        }
        if (paramx.getBool(localObject5))
        {
          m localm = ((a.c.e)localObject5).l();
          d locald = localm.a();
          e locale = ((c_)this.k.get(localObject5)).a();
          if (i4 != 0) {
            break;
          }
          if (locale.i()) {
            do
            {
              if (!localm.e()) {
                break label676;
              }
              locald = localm.a();
              if (i3 != 0) {
                break;
              }
              if (parame.a(locald) == 0)
              {
                parame.a(locald, 1);
                paramn2.a(locald, true);
              }
              localm.f();
            } while (i3 == 0);
          }
        }
        ((a.c.w)localObject4).f();
      } while (i4 != 0);
    } while (i3 == 0);
  }
  
  private boolean a(a.c.e parame, boolean[] paramArrayOfBoolean1, boolean[] paramArrayOfBoolean2, a.f.h.f.a.e parame1)
  {
    int i2 = n;
    int i1 = m;
    boolean bool = false;
    m localm = parame.l();
    d locald;
    label109:
    do
    {
      if (!localm.e()) {
        break;
      }
      locald = localm.a();
      if (i1 != 0) {
        break label152;
      }
      if (paramArrayOfBoolean1[locald.d()] != 0)
      {
        if (i2 != 0) {
          continue;
        }
        if (paramArrayOfBoolean2[locald.d()] == 0)
        {
          paramArrayOfBoolean2[locald.d()] = true;
          if (i2 == 0) {
            if (!a(locald.a(parame), paramArrayOfBoolean1, paramArrayOfBoolean2, parame1)) {
              if (i2 != 0) {
                break label109;
              }
            }
          }
          bool = bool;
          if (i2 != 0) {
            continue;
          }
          if (parame1.a(locald) != 0) {
            bool = true;
          }
        }
      }
      localm.f();
    } while (i1 == 0);
    if ((i2 == 0) && (!bool))
    {
      label152:
      localm = parame.l();
      do
      {
        if (!localm.e()) {
          break;
        }
        locald = localm.a();
        if (i1 != 0) {
          break label217;
        }
        if (parame1.a(locald) == 0) {
          paramArrayOfBoolean1[locald.d()] = false;
        }
        localm.f();
      } while (i1 == 0);
    }
    label217:
    return bool;
  }
  
  private static void a(o paramo, d paramd)
  {
    int i1 = n;
    zb localzb = paramo.e(paramd);
    if ((i1 != 0) || (localzb.a() > 0))
    {
      a.d.w localw = localzb.a(localzb.a() - 1);
      if (i1 == 0)
      {
        if (localw.a() < paramo.m(paramd.f()))
        {
          if (i1 != 0) {
            break label99;
          }
          paramo.b(paramd, new a.d.w(-1.0D, 0.0D));
        }
      }
      else if (m == 0) {
        return;
      }
      label99:
      paramo.b(paramd, new a.d.w(1.0D, 0.0D));
    }
  }
  
  static class d_
  {
    d a;
    d b;
    d c;
    
    d[] a()
    {
      int i = c.n;
      ab localab = new ab();
      if (i == 0) {
        if (this.a != null) {
          localab.add(this.a);
        }
      }
      if (i == 0) {
        if (this.c != null) {
          localab.add(this.c);
        }
      }
      if (this.b != null) {
        localab.add(this.b);
      }
      return localab.p();
    }
    
    public void a(d paramd)
    {
      this.a = paramd;
    }
    
    public d b()
    {
      return this.a;
    }
    
    public void b(d paramd)
    {
      this.b = paramd;
    }
    
    public d c()
    {
      return this.b;
    }
    
    public void c(d paramd)
    {
      this.c = paramd;
    }
    
    public d d()
    {
      return this.c;
    }
    
    public String toString()
    {
      return "\nedge contains:\n  source trace: " + this.a + "\n  original trace: " + this.c + "\n  target trace: " + this.b + "\n";
    }
  }
  
  public class c_
  {
    ab a = new ab();
    ab b = new ab();
    e c;
    a.c.e d;
    public static boolean e;
    
    public c_(a.c.e parame, e parame1)
    {
      this.c = parame1;
      this.d = parame;
    }
    
    public e a()
    {
      return this.c;
    }
    
    public ab b()
    {
      ab localab = new ab();
      localab.a(e());
      localab.a(f());
      return localab;
    }
    
    public a.c.e c()
    {
      return this.d;
    }
    
    public m d()
    {
      return b().l();
    }
    
    public m e()
    {
      return this.a.l();
    }
    
    public m f()
    {
      return this.b.l();
    }
    
    public int g()
    {
      return h() + i();
    }
    
    public int h()
    {
      return this.a.size();
    }
    
    public int i()
    {
      return this.b.size();
    }
    
    public void a(d paramd)
    {
      this.a.add(paramd);
    }
    
    public void c(d paramd)
    {
      this.b.add(paramd);
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.h.f.c

 * JD-Core Version:    0.7.0.1

 */